define(['./../initial', './metro', './map', './project', './project.status'], function () {
    var app = angular.module('App');
    app.config(['$stateProvider', '$urlRouterProvider', '$locationProvider',
        function ($stateProvider, $urlRouterProvider, $locationProvider) {

            $locationProvider.html5Mode(true);
            $urlRouterProvider.when('/metro', '/metro/map');
            //不合法的url,全部导航到'/'
            // $urlRouterProvider.otherwise("/metro/map");
            $urlRouterProvider.otherwise(function ($injector, $location) {
                var $state = $injector.get("$state");
                $state.go("metro.map");
            });
        }
    ]);
    // app.run(['$state', '$rootScope', function($state, $rootScope) {
    //     //注入$state到$rootScope中
    //     $rootScope.$state = $state;
    // }]);
});